package com.googlecode.jawb.clues;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.googlecode.jawb.ListenerTarget;

/**
 * Sets method to be called after field is visited. If name of method is left
 * blank, name will be automatically generated to <i>onPostVisitField</i>, where
 * "Field" is a name of currently processed field.
 */

/**
 * <p>Sets method to be called after each index in array of given field is visited.
 * If name of method is left blank, name will be automatically generated to
 * <i>onItemPostVisitField</i>, where "Field" is a name of currently processed
 * field.</p>
 * 
 * <p>Method does have to accept two arguments of type "int" (current index) and
 * {@link ListenerTarget} (current operation, it is, input or output) and return
 * a value of type "int" (new last index in array, it is, next visited field
 * will be N + 1, where N is value returned by the callback method).</p>
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SetItemPostVisitListener {
	public String         methodName() default "";
	public ListenerTarget target()     default ListenerTarget.ALL;
}
